import { createRouter, createWebHashHistory } from 'vue-router'
import Home from '../views/Home.vue'
// import Select from "@/components/book/Select_list";
import Calendar from "../views/calendar/Calendar";
import User from "../components/user/Update_user";
import Text from "../views/text/Text";
import Book from "../views/book/Pbook";
import Header from "../views/Header";
import Main from "../views/Main";
import Login from "../views/Login";
import History from "../views/history/History";
import Log from "../views/Log"
import QuickAdd from "../views/QuickAdd";


//20210304   zaq   增加日程、说说、个人信息路由
//20210513   zaq   修改home为'/'路由,新增更新日志路由
//20210524   zaq   增加操作日志路由
//20210607   zaq   增加快速添加路由

const routes = [
  {
    // 快速添加
    path: '/quickAdd',
    name:QuickAdd,
    component: QuickAdd,
    meta:{
      title: '快速添加'
    }
  },
  {
    // 操作记录
    path: '/log',
    name:Log,
    component: Log,
    meta:{
      title: '操作记录'
    }
  },
  {
    // 更新日志
    path: '/history',
    name:History,
    component: History,
    meta:{
      title: '更新日志'
    }
  },
  {
    // 日程
    path: '/calendar',
    name:Calendar,
    component: Calendar,
    meta:{
      title: '星球日程'
    }
  },

  {
    // 个人信息
    path:'/user',
    name:User,
    component: User,
    meta:{
      title: '个人信息'
    }
  },
  {
    // 说说
    path: '/text',
    name:Text,
    component: Text,
    meta:{
      title: '有话要说'
    }
  },
  {
    // 账簿导航
    path: '/book',
    name:Book,
    component: Book,
    meta:{
      title: '星球记账簿'
    }
  },
  {
    // 主界面
    path: '/Home',
    name:'Home',
    component: Home,
    meta:{
      title: '一颗小星球'
    }
  },
  // {
  //   // 主界面
  //   path: '/home',
  //   name:'Home',
  //   component: Home
  // },
  {
    // 导航栏
    path: '/header',
    name: 'Header',
    component: Header,
    meta:{
      title: '一颗小星球'
    }
  },
  {
    // 暂时没用
    path: '/main',
    name: 'Main',
    component: Main
  },
  {
    // 登录框
    path: '/',
    name: 'Login',
    component: Login,
    meta:{
      title: '一颗小星球'
    }
  },

  {
    // 暂时没用
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
